home *** CD-ROM | disk | FTP | other *** search
/ Hacker CD 2 / HACKER_CD.iso / Hacker_CD / somm.dxr / 00109_copie sur Mac.ls < prev    next >
Encoding:
Text File  |  2003-04-09  |  3.5 KB  |  100 lines

  1. global dossier, theme, soustheme1, soustheme2, n
  2.  
  3. on copie_mac
  4.   fichiers_jpg_seul()
  5. end
  6.  
  7. on fichiers_jpg_seul
  8.   set the text of field "converti" to n
  9.   X = the number of chars in (member "converti").word[1]
  10.   put " " before char X - 3 of word 1 of field "converti"
  11.   delete word 2 of field "converti"
  12.   conver = word 1 of field "converti"
  13.   os = new(xtra("fileio"))
  14.   dosRegister(41860189)
  15.   disque_system = getOSDirectory()
  16.   member("trans1", 1).text = EMPTY
  17.   member("trans2", 1).text = EMPTY
  18.   i = 1
  19.   put disque_system into field "trans1"
  20.   charac = char i of field "trans1"
  21.   repeat while charac <> ":"
  22.     put charac into char i of field "trans2"
  23.     i = i + 1
  24.     charac = char i of field "trans1"
  25.   end repeat
  26.   disque_system = the text of field "trans2"
  27.   adress_defaut = disque_system & ":"
  28.   if soustheme2 = EMPTY then
  29.     n = conver & ".JPG"
  30.     m = dosSelectFile("save", adress_defaut, n, ["*.*"], "O├╣ voulez-vous enregistrer?")
  31.     dosCopyFile(the moviePath & dossier & ":" & theme & ":" & soustheme1 & ":" & n, m)
  32.   else
  33.     if soustheme1 = EMPTY then
  34.       u = dosIsFileExist(the moviePath & dossier & ":" & theme & ":" & soustheme2 & ":" & n)
  35.       n = conver & ".JPG"
  36.       m = dosSelectFile("save", adress_defaut, n, ["*.*"], "O├╣ voulez-vous enregistrer?")
  37.       dosCopyFile(the moviePath & dossier & ":" & theme & ":" & soustheme2 & ":" & n, m)
  38.     else
  39.       n = conver & ".JPG"
  40.       m = dosSelectFile("save", adress_defaut, n, ["*.*"], "O├╣ voulez-vous enregistrer?")
  41.       put m
  42.       dosCopyFile(the moviePath & dossier & ":" & theme & ":" & soustheme1 & ":" & soustheme2 & ":" & n, m)
  43.     end if
  44.   end if
  45. end
  46.  
  47. on fichiers_wmf_jpg
  48.   set the text of field "converti" to n
  49.   X = the number of chars in (member "converti").word[1]
  50.   put " " before char X - 3 of word 1 of field "converti"
  51.   delete word 2 of field "converti"
  52.   conver = word 1 of field "converti"
  53.   os = new(xtra("fileio"))
  54.   dosRegister(41860189)
  55.   disque_system = getOSDirectory()
  56.   member("trans1", 1).text = EMPTY
  57.   member("trans2", 1).text = EMPTY
  58.   i = 1
  59.   put disque_system into field "trans1"
  60.   charac = char i of field "trans1"
  61.   repeat while charac <> ":"
  62.     put charac into char i of field "trans2"
  63.     i = i + 1
  64.     charac = char i of field "trans1"
  65.   end repeat
  66.   disque_system = the text of field "trans2"
  67.   adress_defaut = disque_system & ":"
  68.   put "adress_defaut : " & adress_defaut
  69.   if soustheme2 = EMPTY then
  70.     u = dosIsFileExist(the moviePath & "wmf" & ":" & theme & ":" & soustheme1 & ":" & n)
  71.     if u <> 1 then
  72.       n = conver & ".WMF"
  73.     else
  74.       n = conver & ".JPG"
  75.     end if
  76.     m = dosSelectFile("save", adress_defaut, n, ["*.*"], "O├╣ voulez-vous enregistrer?")
  77.     dosCopyFile(the moviePath & "wmf" & ":" & theme & ":" & soustheme1 & ":" & n, m)
  78.   else
  79.     if soustheme1 = EMPTY then
  80.       u = dosIsFileExist(the moviePath & "wmf" & ":" & theme & ":" & soustheme2 & ":" & n)
  81.       if u <> 1 then
  82.         n = conver & ".WMF"
  83.       else
  84.         = = conver & ".JPG"
  85.       end if
  86.       m = dosSelectFile("save", adress_defaut, n, ["*.*"], "O├╣ voulez-vous enregistrer?")
  87.       dosCopyFile(the moviePath & "wmf" & ":" & theme & ":" & soustheme2 & ":" & n, m)
  88.     else
  89.       u = dosIsFileExist(the moviePath & "wmf" & ":" & theme & ":" & soustheme1 & ":" & soustheme2 & ":" & n)
  90.       if u <> 1 then
  91.         n = conver & ".WMF"
  92.       else
  93.         n = conver & ".JPG"
  94.       end if
  95.       m = dosSelectFile("save", adress_defaut, n, ["*.*"], "O├╣ voulez-vous enregistrer?")
  96.       dosCopyFile(the moviePath & "wmf" & ":" & theme & ":" & soustheme1 & ":" & soustheme2 & ":" & n, m)
  97.     end if
  98.   end if
  99. end
  100.